public class Factory{
    public static Car createCarByName(String name){
        if("Bmw".equalsIgnoreCase(name)){
            return new Bmw();
        }
        else if("MercedesBenz".equalsIgnoreCase(name)){
            return new MercedesBenz();
        }
		return null;
    }
}
